.class public Lcom/bitauto/autoeasy/selectcar/PromotionDetailActivity;
.super Lcom/bitauto/autoeasy/BaseActivity;
.source "PromotionDetailActivity.java"


# instance fields
.field private dateView:Landroid/widget/TextView;

.field private titleView:Landroid/widget/TextView;

.field private url:Ljava/lang/String;

.field private webView:Landroid/webkit/WebView;


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 18
    invoke-direct {p0}, Lcom/bitauto/autoeasy/BaseActivity;-><init>()V

    return-void
.end method


# virtual methods
.method public findView()V
    .locals 3

    .prologue
    .line 34
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "http://m.bitauto.com/appapi/Preferential/Content.ashx?newsid="

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/PromotionDetailActivity;->getIntent()Landroid/content/Intent;

    move-result-object v1

    const-string v2, "newsid"

    invoke-virtual {v1, v2}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/PromotionDetailActivity;->url:Ljava/lang/String;

    .line 36
    const v0, 0x7f0b01a8

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/PromotionDetailActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/PromotionDetailActivity;->dateView:Landroid/widget/TextView;

    .line 37
    const v0, 0x7f0b01a7

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/PromotionDetailActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/PromotionDetailActivity;->titleView:Landroid/widget/TextView;

    .line 38
    const v0, 0x7f0b01b7

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/PromotionDetailActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/webkit/WebView;

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/PromotionDetailActivity;->webView:Landroid/webkit/WebView;

    .line 39
    return-void
.end method

.method public finish()V
    .locals 1

    .prologue
    .line 61
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/PromotionDetailActivity;->webView:Landroid/webkit/WebView;

    invoke-virtual {v0}, Landroid/webkit/WebView;->clearHistory()V

    .line 62
    invoke-super {p0}, Lcom/bitauto/autoeasy/BaseActivity;->finish()V

    .line 63
    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 1
    .parameter "savedInstanceState"

    .prologue
    .line 25
    invoke-super {p0, p1}, Lcom/bitauto/autoeasy/BaseActivity;->onCreate(Landroid/os/Bundle;)V

    .line 27
    const v0, 0x7f030025

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/PromotionDetailActivity;->setLayout(I)V

    .line 28
    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/PromotionDetailActivity;->setTitleContent()V

    .line 29
    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/PromotionDetailActivity;->findView()V

    .line 30
    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/PromotionDetailActivity;->refreshView()V

    .line 31
    return-void
.end method

.method public refreshView()V
    .locals 5

    .prologue
    const/4 v4, 0x0

    .line 42
    iget-object v1, p0, Lcom/bitauto/autoeasy/selectcar/PromotionDetailActivity;->dateView:Landroid/widget/TextView;

    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/PromotionDetailActivity;->getIntent()Landroid/content/Intent;

    move-result-object v2

    const-string v3, "date"

    invoke-virtual {v2, v3}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 43
    iget-object v1, p0, Lcom/bitauto/autoeasy/selectcar/PromotionDetailActivity;->titleView:Landroid/widget/TextView;

    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/PromotionDetailActivity;->getIntent()Landroid/content/Intent;

    move-result-object v2

    const-string v3, "title1"

    invoke-virtual {v2, v3}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 45
    iget-object v1, p0, Lcom/bitauto/autoeasy/selectcar/PromotionDetailActivity;->webView:Landroid/webkit/WebView;

    invoke-virtual {v1}, Landroid/webkit/WebView;->getSettings()Landroid/webkit/WebSettings;

    move-result-object v0

    .line 46
    .local v0, ws:Landroid/webkit/WebSettings;
    invoke-virtual {v0, v4}, Landroid/webkit/WebSettings;->setAllowFileAccess(Z)V

    .line 47
    invoke-virtual {v0, v4}, Landroid/webkit/WebSettings;->setJavaScriptEnabled(Z)V

    .line 48
    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/webkit/WebSettings;->setBuiltInZoomControls(Z)V

    .line 49
    const-string v1, "utf-8"

    invoke-virtual {v0, v1}, Landroid/webkit/WebSettings;->setDefaultTextEncodingName(Ljava/lang/String;)V

    .line 50
    iget-object v1, p0, Lcom/bitauto/autoeasy/selectcar/PromotionDetailActivity;->webView:Landroid/webkit/WebView;

    new-instance v2, Lcom/bitauto/autoeasy/selectcar/PromotionDetailActivity$1;

    invoke-direct {v2, p0}, Lcom/bitauto/autoeasy/selectcar/PromotionDetailActivity$1;-><init>(Lcom/bitauto/autoeasy/selectcar/PromotionDetailActivity;)V

    invoke-virtual {v1, v2}, Landroid/webkit/WebView;->setWebViewClient(Landroid/webkit/WebViewClient;)V

    .line 56
    iget-object v1, p0, Lcom/bitauto/autoeasy/selectcar/PromotionDetailActivity;->webView:Landroid/webkit/WebView;

    iget-object v2, p0, Lcom/bitauto/autoeasy/selectcar/PromotionDetailActivity;->url:Ljava/lang/String;

    invoke-virtual {v1, v2}, Landroid/webkit/WebView;->loadUrl(Ljava/lang/String;)V

    .line 57
    return-void
.end method
